<div  class="contextual-links-region" >
<script type="text/javascript">
    var LOGIN = {
        'USER_URL':'<?php echo Yii::app()->createUrl('user/index') ?>',
        'PEOPLE_URL':'<?php echo Yii::app()->createUrl('people/index') ?>',
        'IMG_PATH':'<?php echo Yii::app()->params['imgPath'] ?>',
        'AVATAR_URL':'<?php echo Yii::app()->createUrl('user/avatar') ?>',
        'LOGIN_URL':'<?php echo Yii::app()->createUrl('auth/login') ?>',
        'IMG' : '<?php echo $this->path; ?>/images',
        'LOGOUT_URL':'<?php echo Yii::app()->createUrl('auth/logout'); ?>',
        'REG_URL':'<?php echo Yii::app()->createUrl('auth/register') ?>',
        'QQ_URL':'<?php echo Yii::app()->createUrl('auth/connect',array('type'=>'qq')) ?>',
        'SINA_URL':'<?php echo Yii::app()->createUrl('auth/connect',array('type'=>'sina')) ?>',
        'FORGET_URL':'<?php echo Yii::app()->createUrl('auth/forget') ?>',
        'LOGIN_OUT':<?php echo $logout; ?>,
        'HOME_URL':'<?php echo Yii::app()->homeUrl; ?>',
    };
</script>

    <?php
    $message = Yii::app()->user->getState('message');
    $auth = Yii::app()->user->getState('user_auth');
    ?>
    <div id="login_box" class="status-grid mb10">
        <div id="login_box_2" class="list flip in">
            <div class="status-grid-head">
                <img id="tx-ct" src="<?php echo Yii::app()->params['imgPath'].$auth['bg_url']; ?>" title="people-name"/>
            </div>
            <div class="status-people-pic">
                <a href="<?php echo Yii::app()->createUrl('user/avatar') ?>">
                    <?php if($auth['avatar_status']): ?>
                        <img class="stat-people" src="<?php echo Xtutuquan::getAvatar(Yii::app()->user->id); ?>" title="people-name"/>
                    <?php else: ?>
                        <img class="stat-people" src="<?php echo Yii::app()->params['imgPath'].'uploads/public/avatar/'.$auth['avatar_public'].'.jpg'; ?>" title="people-name"/>
                    <?php endif; ?>
                    <span class="bg"></span><span class="text">添加/更换头像</span>
                </a>
                <img class="people-avilabel" src="<?php echo $this->path; ?>/images/avila.png" title="avilabel"/>
            </div>
            <div id="tip-message"></div>
            <div class="status-people-info">
                <h2>
                    <a href="<?php echo Yii::app()->createUrl('user/index') ?>">
                        <?php if($auth['nick_name']): ?>
                            <?php echo $auth['nick_name']; ?>
                        <?php else: ?>
                            <?php echo $auth['username']; ?>
                        <?php endif; ?>
                    </a>
                </h2>
                <?php if($auth['feeling']):  ?>
                    <p class="status-people-content"><?php echo $auth['feeling']; ?></p>
                <?php endif ?>

            </div>
            <div class="clear"></div>
        </div>
    </div>
</div>